/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scactbnotienv")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scactbnotienv.findAll", query = "SELECT s FROM Scactbnotienv s"),
    @NamedQuery(name = "Scactbnotienv.findByScactbnotienvid", query = "SELECT s FROM Scactbnotienv s WHERE s.scactbnotienvid = :scactbnotienvid"),
    @NamedQuery(name = "Scactbnotienv.findByEmailenviados", query = "SELECT s FROM Scactbnotienv s WHERE s.emailenviados = :emailenviados"),
    @NamedQuery(name = "Scactbnotienv.findByFecharegistro", query = "SELECT s FROM Scactbnotienv s WHERE s.fecharegistro = :fecharegistro")})
public class Scactbnotienv implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scactbnotienvid")
    private Integer scactbnotienvid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "emailenviados")
    private String emailenviados;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecharegistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @JoinColumn(name = "scsgtbrolesid", referencedColumnName = "scsgtbrolesid")
    @ManyToOne(optional = false)
    private Scsgtbroles scsgtbrolesid;
    @JoinColumn(name = "scactbnotifiid", referencedColumnName = "scactbnotifiid")
    @ManyToOne(optional = false)
    private Scactbnotifi scactbnotifiid;

    public Scactbnotienv() {
    }

    public Scactbnotienv(Integer scactbnotienvid) {
        this.scactbnotienvid = scactbnotienvid;
    }

    public Scactbnotienv(Integer scactbnotienvid, String emailenviados, Date fecharegistro) {
        this.scactbnotienvid = scactbnotienvid;
        this.emailenviados = emailenviados;
        this.fecharegistro = fecharegistro;
    }

    public Integer getScactbnotienvid() {
        return scactbnotienvid;
    }

    public void setScactbnotienvid(Integer scactbnotienvid) {
        this.scactbnotienvid = scactbnotienvid;
    }

    public String getEmailenviados() {
        return emailenviados;
    }

    public void setEmailenviados(String emailenviados) {
        this.emailenviados = emailenviados;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public Scsgtbroles getScsgtbrolesid() {
        return scsgtbrolesid;
    }

    public void setScsgtbrolesid(Scsgtbroles scsgtbrolesid) {
        this.scsgtbrolesid = scsgtbrolesid;
    }

    public Scactbnotifi getScactbnotifiid() {
        return scactbnotifiid;
    }

    public void setScactbnotifiid(Scactbnotifi scactbnotifiid) {
        this.scactbnotifiid = scactbnotifiid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scactbnotienvid != null ? scactbnotienvid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scactbnotienv)) {
            return false;
        }
        Scactbnotienv other = (Scactbnotienv) object;
        if ((this.scactbnotienvid == null && other.scactbnotienvid != null) || (this.scactbnotienvid != null && !this.scactbnotienvid.equals(other.scactbnotienvid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scactbnotienv[ scactbnotienvid=" + scactbnotienvid + " ]";
    }
    
}
